import { put, takeLatest } from 'redux-saga/effects';
import { USER_REQUEST, USER_SUCCESS } from '../actionTypes';
import user from '../api/user';

function* userInfo() {
  const result = yield user.info();

  yield put({
    type:USER_SUCCESS,
    data:result
  })
}

export default [
  takeLatest(USER_REQUEST,userInfo),
]